<!doctype html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<html>
<head>
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>
    <%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
    <script type="text/javascript" src="${path}/html/js/js-jsp/common/select-plugin.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/common.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/st/contract/contractOption.js?v=<%out.print(Math.random());%>"></script>
</head>
<body>
<div class="place">
    <span>当前位置：</span>
    <ul class="placeul">
        <li><a href="${path}/contract/index.do" id="aa" style="background: transparent; border: none">项目合同</a></li>
        <li>
            <c:if test="${null == contract.coId}">
                <a style="background: transparent; border: none;">添加合同</a>
            </c:if>
            <c:if test="${null != contract.coId}">
                <a style="background: transparent; border: none;">编辑合同</a>
            </c:if>
        </li>
    </ul>
</div>
<form id="operate_form" class="form" method="post" action="#">
    <div class="formbody">
        <div class="formtitle"><span>基本信息</span></div>
        <table id="contractDesc" align="center" border="0" width="100%">
            <ul class="forminfo">
                <li><input type="hidden" name="coId" id="coId" value="${contract.coId}" />
                    <input type="hidden" name="companyId" id="companyId" value="${companyId}"/>
                    <input type="hidden" name="coCode" id="coCode" value="${contract.coCode}"/>
                </li>
                <li>
                    <label>合同名称：</label>
                    <input class="easyui-textbox" name="coName" id="coName" value="${contract.coName}"
                                            style="width:255px; height: 30px" data-options="validType:'length[1,18]',required:'true',prompt:'请输入合同名称'" missingMessage="合同名称不能为空"/>
                </li>
                <li>
                    <label>合同编号：</label>
                    <input type="hidden" id="oldCoNumber" value="${contract.coNumber}">
                    <input class="easyui-textbox" name="coNumber" id="coNumber" value="${contract.coNumber}"
                                            style="width:255px; height: 30px" data-options="validType:['length[1,11]','coNumberIsExists[\'oldCoNumber\']'],delay:30000000,interval:30000000,validateOnBlur:true,required:'true',prompt:'请输入合同编号'," missingMessage="合同编号不能为空"/>
                </li>
                <li>
                    <label>所属项目：</label>
                    <input type="hidden" name="prId" id="prId" value="${contract.prId}" editable="false">
                    <select class="easyui-combobox" id="projectList" style="width:255px; height: 32px" editable="false" validType="selectNotEmpty['所属项目']">
                    </select>
                </li>
                </li>
                <li>
                    <label>签订日期：</label>
                    <input id="signDate"  style="width:255px; height: 32px"	class="easyui-datebox" name="signDate" data-options="prompt:'请选择签订日期',editable:false" value="<fmt:formatDate value="${contract.signDate}" pattern="yyyy-MM-dd"/>">
                </li>
                <li>
                    <label>生效日期：</label>
                    <input id="startDate"  style="width:255px; height: 32px"	class="easyui-datebox" name="startDate" data-options="prompt:'请选择生效日期',editable:false" value="<fmt:formatDate value="${contract.startDate}" pattern="yyyy-MM-dd"/>">
                    
                </li>
                <li>
                    <label>截止日期：</label>
                    <input id="endDate"  style="width:255px; height: 32px"	class="easyui-datebox" name="endDate" data-options="prompt:'请选择截止日期',editable:false" value="<fmt:formatDate value="${contract.endDate}" pattern="yyyy-MM-dd"/>">
                    
                </li>
                <li>
                    <label>合同发起方：</label>
                    <input class="easyui-textbox" data-options="validType:'length[1,18]',prompt:'请输入合同发起方'" name="initiator" id="initiator" style="width:255px; height: 30px"  value="${contract.initiator}"/>
                    
                </li>
                <li>
                    <label>合同履行方：</label>
                    <input class="easyui-textbox" data-options="validType:'length[1,18]',prompt:'请输入合同履行方'" name="execute" id="execute" style="width:255px; height: 30px"  value="${contract.execute}"/>
                    
                </li>
                <li>
                    <label style="vertical-align: top;">备注信息：</label>
                    <input class="easyui-textbox" name="remark" id="remark" style="width:255px; height: 100px" data-options="validType:'length[1,30]',multiline:true,prompt:'请输入备注信息'" value="${contract.remark}"/>
                </li>
            </ul>
                <div class="formbody" style="margin-left: 110px">
                    <a id="optionContract" class="easyui-linkbutton c1" style="width:120px; height: 35px">保存</a>
                        &nbsp;&nbsp;&nbsp;
                        <a href="${path}/contract/index.do" class="easyui-linkbutton c1" style="width:120px; height: 35px">取消</a>
                </div>
        </table>
    </div>
</form>
</body>
</html>